package day0811;

/**
 * @Author:galaxy_yan
 * @Date: 2022/8/14
 * @Time: 9:32
 * @Description
 * 作业标题(1677)
 * 二进制序列
 */
public class text6 {
    public static void main(String[] args) {
        int num=19;
        odd_bits(19);
        System.out.println(" ");
        even_bits(19);
    }
    public  static void odd_bits(int num){
        for(int i = 1; i < 32; i = i + 2){
            if((num & (1 << i)) == 0){
                System.out.print("0  ");
            }else{
                System.out.print("1  ");
            }
        }
    }
   public static void even_bits(int num){
        for(int i = 0; i < 32; i = i + 2){
            if((num & (1 << i)) == 0){
                System.out.print("0  ");
            }else{
                System.out.print("1  ");
            }
        }
    }


}
